import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import LoginView from '../views/LoginView.vue'
import UserView from '../views/UserView.vue'
import ArticleView from '../views/ArticleView.vue'
import NotifyView from '../views/NotifyView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    
    {
      path: '/login',
      name: 'Login',
      component: LoginView
    },
    {
      path: '/',
      name: 'Root',
      component: HomeView,
      children: [
        {
          path: 'user',
          name: 'User',
          component: UserView
        },
        {
          path: 'article',
          name: 'Article',
          component: ArticleView
        },
        {
          path: 'notify',
          name: 'Notify',
          component: NotifyView
        }
    ]}
  ]
})

export default router
